package com.student.enrollment.service;

import com.student.common.entity.Enrollment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.Map;

/**
 * 选课服务接口
 * 
 * @author student
 * @date 2025
 */
public interface EnrollmentService {
    
    /**
     * 学生选课
     */
    boolean selectCourse(String studentId, String courseId, String semester);
    
    /**
     * 学生选课（带选课时间）
     */
    boolean selectCourse(String studentId, String courseId, String semester, String enrollmentDate);
    
    /**
     * 学生退课
     */
    boolean dropCourse(String studentId, String courseId, String semester);
    
    /**
     * 查询学生选课
     */
    Page<Enrollment> getStudentEnrollments(String studentId, String semester, Pageable pageable);
    
    /**
     * 查询课程选课学生
     */
    Page<Enrollment> getCourseEnrollments(String courseId, String semester, Pageable pageable);
    
    /**
     * 选课列表查询
     */
    Page<Enrollment> getEnrollmentList(Pageable pageable, String studentId, String courseId, String semester, String status);
    
    /**
     * 选课列表查询（带详细信息）
     */
    Page<Map<String, Object>> getEnrollmentListWithDetails(Pageable pageable, String studentId, String courseId, String semester, String status);
    
    /**
     * 选课统计
     */
    Object getEnrollmentStatistics(String semester);
    
    /**
     * 获取选课总数
     */
    long getEnrollmentCount();
}
